
package com.suzj.extraenchantments.enchant;

import java.util.function.Predicate;

import net.minecraft.world.item.*;
import net.minecraft.world.item.enchantment.EnchantmentCategory;


public class EnchantmentTypeEE {
    public static EnchantmentCategory TYPE_SHIELD = EnchantmentCategory.create("shieldee", (item) -> item instanceof ShieldItem);
    public static final EnchantmentCategory PICKAXE;
    public static final EnchantmentCategory AXE;
    public static final EnchantmentCategory ELYTRA;

    private static EnchantmentCategory addEnchantment(String name, Predicate<Item> condition) {
        return EnchantmentCategory.create(name, condition);
    }

    static {
        PickaxeItem.class.getClass();
        PICKAXE = addEnchantment("pickaxe", PickaxeItem.class::isInstance);
        AxeItem.class.getClass();
        AXE = addEnchantment("axe", AxeItem.class::isInstance);
        ElytraItem.class.getClass();
        ELYTRA = addEnchantment("elytra", ElytraItem.class::isInstance);
    }
}
